
package br.ufpe.abaco.ParserGen;

import br.ufpe.abaco.ParserGen.parser.*;

public class Teste {

    public static void main(String args[]) {
	BNFGrammar g = new BNFGrammar();
	TerminalSymbol ta = g.getTerminal("a");
	TerminalSymbol tb = g.getTerminal("b");
	TerminalSymbol tc = g.getTerminal("c");
	NonTerminalSymbol n1 = g.getNonTerminal("X");
	NonTerminalSymbol n2 = g.getNonTerminal("Y");

	g.addProduction(n1, new GrammarSymbol[] {n2});

	g.addProduction(n2, new GrammarSymbol[] {ta,n2});
	g.addProduction(n2, new GrammarSymbol[] {ta,tb,n2});
	g.addProduction(n2, new GrammarSymbol[] {});
	g.startSymbol(n1);

	Parser p = new Parser(g);
	p.printTable();

    }

}
